Public Class ProductionStatusReport_Print
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents litReport As System.Web.UI.WebControls.Literal
    Protected WithEvents lblCustomerName As System.Web.UI.WebControls.Label
    Protected WithEvents lblSupplierCode As System.Web.UI.WebControls.Label
    Protected WithEvents lblCurrentDate As System.Web.UI.WebControls.Label
    Protected WithEvents lblWeek As System.Web.UI.WebControls.Label
    Protected WithEvents lblOrderNumber As System.Web.UI.WebControls.Label
    Protected WithEvents lblTotalItem As System.Web.UI.WebControls.Label
    Protected WithEvents lblPrintingInstruction As System.Web.UI.WebControls.Label

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not Page.IsPostBack Then
            With CType(Session(ProductionStatusReport.PRODUCTION_STATUS_REPORT_SESSION_NAME), CProductionStatusReport)

                Me.lblCustomerName.Text = .CustomerName
                Me.lblOrderNumber.Text = .OrderNumberAsDisplay
                Me.lblSupplierCode.Text = .SupplierCode
                Me.lblCurrentDate.Text = .OrderDateAsDisplay
                Me.lblWeek.Text = String.Format("Week: {0} / Year: {1}", .Week, .Year)
                Me.lblTotalItem.Text = .TotalItemAsDisplay

                .Output = Report.EReportOutputType.Printer
                .RefreshReport()
                Me.litReport.Text = .GetReportHTML

                '.Output = Report.EReportOutputType.Printer
                'Me.litReport.Text = .GetReportHTML
            End With
        End If
    End Sub

End Class
